Skip to content

first stab at adding nft license view #172

Closed
bjartek wants to merge 2 commits intoonflow:masterfrom
findonflow:license-view
Closed

first stab at adding nft license view #172
bjartek wants to merge 2 commits intoonflow:masterfrom
findonflow:license-view

Conversation

@bjartek
Copy link
Contributor

@bjartek bjartek commented May 31, 2023

I added methods for each of the 12 combinations.

Not really sure what we should expose from the struct or if this way of creating it is the best way.

Description


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels
  • Update the version in package.json when there is a change in the smart contracts

@bjartek bjartek requested a review from joshuahannan as a code owner May 31, 2023 07:46
Copy link
Member

@joshuahannan joshuahannan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking a stab! I was a little confused about how you implemented it at first, but after thinking about it, I think it makes sense and allows us to add more combinations in the future if needed. I'm wondering if it also would be nice to also include a description like we did in the proposal that I made in the other issue.

And also similar to that proposal, we want to include a Media for each right to potentially link to an off-chain description of the rights or this "badge" that is mentioned in the proposal.

I'm happy to make those changes and add some tests, though I'm not sure the best way to do it since this is in your fork. Can I just copy your code to my branch?

///
pub fun getRarity(_ viewResolver: &{Resolver}) : Rarity? {
if let view = viewResolver.resolveView(Type<Rarity>()) {
if let vTiew = viewResolver.resolveView(Type<Rarity>()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if let vTiew = viewResolver.resolveView(Type<Rarity>()) {
if let view = viewResolver.resolveView(Type<Rarity>()) {

@bjartek
Copy link
Contributor Author

bjartek commented May 31, 2023

Thanks for taking a stab! I was a little confused about how you implemented it at first, but after thinking about it, I think it makes sense and allows us to add more combinations in the future if needed. I'm wondering if it also would be nice to also include a description like we did in the proposal that I made in the other issue.

And also similar to that proposal, we want to include a Media for each right to potentially link to an off-chain description of the rights or this "badge" that is mentioned in the proposal.

I'm happy to make those changes and add some tests, though I'm not sure the best way to do it since this is in your fork. Can I just copy your code to my branch?

Feel free to copy

@joshuahannan joshuahannan mentioned this pull request Jun 26, 2023
6 tasks
@joshuahannan
Copy link
Member

I opened a new PR with my suggestions: #173

I'll close this for now in favor of that one. Please leave feedback when you get the chance! Thank you. :)

@joshuahannan joshuahannan mentioned this pull request Aug 28, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants